package com.javademo.enumtest;

import com.javademo.enumtest.enumentity.Size;
import lombok.extern.slf4j.Slf4j;

import java.util.Scanner;

@Slf4j
public class Test {
    public static void main(String[] args) {
        Size size = Size.SMALL;
        log.info("size:{}", size);
    }

    private static void pizzaSize(Size size) {
        switch (size) {
            case SMALL:
                log.info("Small Pizza");
                break;
            case MEDIUM:
                log.info("Medium Pizza");
                break;
            case LARGE:
                log.info("Large Pizza");
                break;
            case EXTRALEGAL:
                log.info("Extra Legal Pizza");
                break;
            default:
                log.info("Unknown Pizza");
        }
    }

    private static void ordinalTest(Size size) {
        int value = size.ordinal();
        log.info("ordinal:{}", value);
    }
}
